package cn.chair.entity;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import life.innovation.annotation.orm.Entity;
import life.innovation.annotation.orm.Id;
import life.innovation.model.BaseModel;
import life.innovation.util.JsonDateDeserializer;
import life.innovation.util.JsonDateSerializer;

import java.util.Date;

@Entity(autoIncrementedKey = false)
public class Merchant extends BaseModel {

    public static final int STATUS_INACTIVE = 0;
    public static final int STATUS_ACTIVE = 1;
    public static final int STATUS_PENDING = 2;

    @Id
    private int id;
    private int orgId;
    private String name;
    private int regionId;
    private double longitude;
    private double latitude;
    @JsonSerialize(using = JsonDateSerializer.class)
    @JsonDeserialize(using = JsonDateDeserializer.class)
    private Date createdAt;
    private Integer status;
    private String linkMan;
    private String phone;
    private Date open_begin;
    private Date open_end;
    private String address;
    private int packageGroupId;
    private int merchant_config_id;

    public int getPackageGroupId() {
        return packageGroupId;
    }

    public void setPackageGroupId(int packageGroupId) {
        this.packageGroupId = packageGroupId;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getLinkMan() {
        return linkMan;
    }

    public void setLinkMan(String linkMan) {
        this.linkMan = linkMan;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Date getOpen_begin() {
        return open_begin;
    }

    public void setOpen_begin(Date open_begin) {
        this.open_begin = open_begin;
    }

    public Date getOpen_end() {
        return open_end;
    }

    public void setOpen_end(Date open_end) {
        this.open_end = open_end;
    }

    public Merchant() {
        this.status = STATUS_PENDING;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getOrgId() {
        return orgId;
    }

    public void setOrgId(int orgId) {
        this.orgId = orgId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getRegionId() {
        return regionId;
    }

    public void setRegionId(int regionId) {
        this.regionId = regionId;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public int getMerchant_config_id() {
        return merchant_config_id;
    }

    public void setMerchant_config_id(int merchant_config_id) {
        this.merchant_config_id = merchant_config_id;
    }
}
